<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<jsp:include page="../../../inc/xheditor.jsp"></jsp:include>
<script type="text/javascript">
$(document).ready(function() {
	$("#msgReplyList").load("msgReplyList.do", {
		tableName : '${param.tableName }',
		pid : '${param.pid }',
		id : '${param.id}',
		random : Math.random()
	});
	$("#msgReply_submit").button().click(function() {
		var hidden = "N";
		if ($("#hidden").attr("checked"))
			hidden = "Y";
		var content = $("#content").val();

		if (content == '') {
			alert('请输入留言内容！');
			return false;
		}
		var code = $("#code").val();
		if (code == '') {
			alert('请输入验证码！');
			return false;
		}
		$.get("addMsgReply.do", {
			id : $("#id").val(),
			pid : $("#pid").val(),
			tableName : $("#tableName").val(),
			content : $("#content").val(),
			hidden : hidden,
			hiddenName : $("#hiddenName").val(),
			code : $("#code").val()
		}, function(data) {
			alert(data);
		});
	});
});
</script>
<jsp:include page="../../../inc/baidu.jsp" />
<div class="msgReply"><div id="msgReplyList"></div>
	<input type="hidden" id="tableName" value="${param.tableName }">
	<input type="hidden" id="pid" value="${param.pid }">
	<textarea class="xheditor-mini" style="width: 600px;" id="content"
		name="content"></textarea>
	<div style="padding: 3px; width: 100%;">
		匿名
		<input type="checkbox" name="hidden" id="hidden" />
		<input type="text" name="hiddenName" id="hiddenName" value="">
		输入验证码
		<input type="text" name="code" id="code" style="width: 30px;">
		<img style="margin: 0; border: 0; cursor: hand" title="点击切换图片"
			align="top" src="getCodeImg" onClick="codeImg(this);" />
		<button id="msgReply_submit" style="float: right;">
			发布留言
		</button>
	</div>
</div>